package price;


import com.google.gson.Gson;

/**
 * Created by wangxingsheng on 2019/5/21.
 */
public class PriceTest {
    public static void main(String[] args) {

//        float a = Arith.add(2.1, 2.2).floatValue();
//        double b = Arith.add(2.1, 2.2).doubleValue();
//        String c = Arith.add(2.1, 2.2).toString();
//
//        double f = 2.1 + 2.2;
//        System.out.println(a);
//        System.out.println(b);
//        System.out.println(c);

//        System.out.println(0.05 + 0.01);  //0.060000000000000005
//        System.out.println(1.0 - 0.42);   //0.5800000000000001
//        System.out.println(1.0f - 0.42f); //0.58000004
//        System.out.println(4.015 * 100);  //401.49999999999994
//        System.out.println(123.3 / 100);  //1.2329999999999999
//        System.out.println(2.1 + 2.2);      //4.300000000000001
//        System.out.println(1.1 - 0.2);      //0.9000000000000001
//        System.out.println(1 - (0.42 + 0.58));
//        System.out.println(1 + 2);
//        System.out.println(1 - 3);
        new Gson();

        String as = "212132121212.1212";
        String bs = "212122121212.1212";
        double a = Double.valueOf(as);
        double b = Double.valueOf(bs);
        System.out.println(a);
        System.out.println(b);
        System.out.println(Arith.sub(as, bs).doubleValue());
        System.out.println(a - b);
    }
}
